﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KylinORM.Aspect
{
    /// <summary>
    /// 处理EventManager.Bus中的全局命令
    /// </summary>
    [Serializable]
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public class HandlerAttribute : Attribute
    {
        /// <summary>
        /// 定义当前方法为命令的处理程序
        /// </summary>
        /// <param name="commandName">要处理的命令名称</param>
        public HandlerAttribute(string commandName)
        {
            this.CommandName = commandName;
        }

        /// <summary>
        /// 要处理的命令名称
        /// </summary>
        public string CommandName { get; set; }
    }
}
